package com.park.service.impl.question;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.park.client.model.question.QuestionAnswerModel;
import com.park.client.service.question.QuestionAnswerService;
import com.park.dao.question.QuestionAnswerMapper;
import com.park.service.impl.base.BaseServiceImpl;

@Service("questionAnswerService")
public class QuestionAnswerServiceImpl extends BaseServiceImpl<QuestionAnswerModel> implements QuestionAnswerService {
	
	@Autowired
	private QuestionAnswerMapper  questionAnswerMapper;

	@Override
	public boolean deleteByPrimaryKey(Long id) {
		return questionAnswerMapper.deleteByPrimaryKey(id)==1;
	}

	@Override
	public boolean insert(QuestionAnswerModel record) {
		return questionAnswerMapper.insert(record)==1;
	}

	@Override
	public boolean insertSelective(QuestionAnswerModel record) {
		return questionAnswerMapper.insertSelective(record)==1;
	}

	@Override
	public QuestionAnswerModel selectByPrimaryKey(Long id) {
		return questionAnswerMapper.selectByPrimaryKey(id);
	}

	@Override
	public boolean updateByPrimaryKeySelective(QuestionAnswerModel record) {
		return questionAnswerMapper.updateByPrimaryKeySelective(record)==1;
	}

	@Override
	public boolean updateByPrimaryKey(QuestionAnswerModel record) {
		return questionAnswerMapper.updateByPrimaryKey(record)==1;
	}

	@Override
	public List<QuestionAnswerModel> selectAll() {
		return questionAnswerMapper.selectAll();
	}

	@Override
	public List<Integer> selectByQuestionId(Integer questionId) {
		return questionAnswerMapper.selectByQuestionId(questionId);
	}

	@Override
	public QuestionAnswerModel selectIsExists(QuestionAnswerModel record) {
		return questionAnswerMapper.selectIsExists(record);
	}


	@Override
	public List<QuestionAnswerModel> selectPagination(QuestionAnswerModel t) {
		return questionAnswerMapper.selectPagination(t);
	}

	@Override
	public Integer selectTotal(QuestionAnswerModel t) {
		return questionAnswerMapper.selectTotal(t);
	}

}
